The ISO/OSI reference model

The ISO/OSI model defines 7 layers, the 5 mentioned above plus 2 more between application and transport:

  • presentation: allowing applications to interpret meaning of data, such as: encryption, compression, machine-specific conventions, etc.
  • session: synchronization, checkpointing, recovery of data exchange
  • The Internet stack, as a practical approach, does not implement these layers!
    • These services, if needed, must be implemented in the application layer
    • The question is: are they really needed?
Picture showing the ISO/OSI reference model and some devices or applications related to it. For example, routers functionality is focused of layer 3 or Network layer, while the email or web searching in Google is layer 7 or Application layer.
The ISO/OSI reference model defines 7 layers, from top to bottom: Application, Presentation, Session, Transport, Network, Data Link and Physical layer. Hosts usually implement all of them, while forwarding devices usually implement just the last three ones. The data unit (or protocol message) used in each of the layers is called typically “Data” for Application, Presentation and Session layers; “Segment” for the Transport layer, “Packets” for the Network layer; “Frame” for the Data Link layer and “Bits” for the Physical layer.

Let us now examine how a message “M” would be sent from a source to a destination computer. The original message “M” is sent from the application to the transport layer. The transport layer includes its own transport header “Ht” to distinguish different messages arriving from the application layer. For example, this header could contain a sequence number or some identification number. Afterwards, it sends both the header and message to the network layer.

The network layer receives “Ht+M”, although it will not be aware of what part is the original message. It then adds its own network header “Hn” and sends it down to the link layer, which finally receives “Hn+Ht+M” and adds its link layer header “Hl”. The link layer sends it to the physical layer, which will not add any additional information. The physical layer is in charge of transmitting every bit of the chunk of bytes represented by “Hl+Hn+Ht+M”.

This operation of adding headers to a message in each protocol layer is called packet encapsulation.

The receiver of these bits, will apply the opposite operation, decapsulation, taking out the headers for each protocol until it obtains the original message “M”.

When a user sends some data to some other user, this data is sent at layer 7 or Application layer, layer 6, 5, etc. will include its own information to the data, increasing it in size. This is called “encapsulation”. Finally, the data is sent bit by bit via the physical link. Once received, the process is reversed, taking out the added information in each layer, until the receiver gets the original data sent, which is called “decapsulation”.
Picture showing an example of encapsulation of “Data” with UDP as Transport protocol and IP as Network protocol.

Notice that not all devices in the network need to implement all the protocol layers. For example, a router just implements 3 layers, as it does not need transport or application, and a switch does not even need the network layer, as it does not route packets among different networks.

Question

If an email “M” from source contains 123 bytes, the transport header “Ht” size is 10 bytes, the network header “Hn” size is 20 bytes and the link header “Hl” size is 16 bytes.

  1. What is the actual number of bits sent in the communication line towards destination? (Remember 1 byte = 8 bits)
    1. 123
    2. 169
    3. 1352
    4. 984
  2. Check answer
  3. How many bytes does the destination receive at application layer level?
    1. 123
    2. 169
    3. 1352
    4. 984
  4. Check answer
UHI logo

All efforts have been made to ensure materials created by the EDU comply with current accessibility guidelines (JISC: Support for learners with disabilities).

If further assistance is required with accessibility matters please contact the student support section in your academic partner UHI: Accessing learner support.

We welcome any comments on how to improve this unit. Please feel free to pass these on at any time.

If you have any difficulty viewing this resource please contact EDU (edu@uhi.ac.uk) with:

  • the name of the resource;
  • a description of the problem (please give as much detail as possible);
  • the section of the resource where the problem occurred;
  • your internet browser (you can check your browser version at: http://detectmybrowser.com/).

UHI provides links to external sources of information and may refer to specific Web sites, products, processes or services within this resource. Such references are examples and are not endorsements and whilst every effort is taken to ensure the accuracy of information provided UHI is not responsible for any of the content or guidance. You are advised to exercise caution.

Audio

Video

Reading

Download

Information

External link

Activity

Print

Question

Asterisk

Discussion

Collaboration

Reflection/journal/log

History

Pause for thought

Download a copy of this resource in PDF format.

You can also print individual pages by printing directly from the browser.

×